<!DOCTYPE html>
<!--
  ~ Copyright (C) 2018 guomw.Inc. All rights reserved.
  ~ 项目名称： mysite
  ~ 文件名称： list.html
  ~ Date：18-9-25 下午5:50
  ~ Author: guomw
  -->

<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/head::head('资讯列表')">
<body class="gray-bg">
<div class="wrapper wrapper-content  animated fadeInRight">
    <!--search-->
    <form role="form" class="search-panel">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-content p-m no-borders">
                        <div class="form-inline">
                            <div class="form-group m-r-sm">
                                <label class="control-label" >标题：</label>
                                <input type="text" class="form-control input-sm mb10" id="keyword" name="keyword"
                                       placeholder="模糊搜索"/>
                            </div>
                            <div class="form-group m-r-sm">
                                <label class="control-label" >状态：</label>
                                <select id="sl_status" style="height: 34px;" tabindex="2">
                                    <option value="-1">请选择状态</option>
                                    <option value="0" >未发布</option>
                                    <option value="1" >已发布</option>
                                    <option value="2" >已下架</option>
                                </select>
                            </div>
                        </div>
                        <p style="height: 8px;"></p>
                        <div class="form-inline" style="max-width: 926px; text-align: right;">
                            <button type="button" class="btn btn-success" onclick="articleHandler.search()">筛选</button>
                            <button type="button" class="btn btn-success" onclick="articleHandler.searchAll()">显示全部</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <!--search-->
    <!--list-->
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>文章列表</h5>
                    <div class="ibox-tools">
                        <a data-toggle="modal" onclick="articleHandler.edit(0)">
                            <i class="fa fa-plus"></i>
                            添加文章
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="table table-bordered table-hover table-center">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>资讯标题</th>
                            <th>分类</th>
                            <th>封面</th>
                            <th>发布时间</th>
                            <th>创建时间</th>
                            <th>最后时间</th>
                            <th>发布状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="table-content">
                        </tbody>
                    </table>
                    <!--分页控件-->
                    <div th:include="template/pager::pager"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<template id="template_list">
    <tr>
        <td>{index}</td>
        <td>{ArticleTitle}</td>
        <td>{classifyName}</td>
        <td><img src="{ArticleCover}" width="60" height="60" onerror="this.src='../../resource/img/bg.png'"/></td>
        <td>{PublishTime}</td>
        <td>{CreateTime}</td>
        <td>{UpdateTime}</td>
        <td>{articleStatus}</td>
        <td>
            <a type="button" class="btn-a" data-toggle="modal" onclick="articleHandler.edit({articleId})">修改</a>
            <a type="button" class="btn-a" data-toggle="modal" onclick="articleHandler.updateStatus({articleId},1)">发布</a>
            <a type="button" class="btn-a" data-toggle="modal" onclick="articleHandler.updateStatus({articleId},2)">下架</a>
        </td>
    </tr>
</template>
<footer th:include="common/footer::js"/>
<script src="../../resource/js/views/articlelist.js?v=1.0.0"></script>
</body>
</html>
